(function($){
	$.extend({
		publicStyle: {
			popupBgStyle: {
				backgroundColor: 'rgba(0,0,0,.5)',
				position: 'fixed',
				top: '0',
				left: '0',
				display: 'none',
				width: '100%',
				height: '100%',
				zIndex: '2010'
			}
		},
		artConfim: function (value, frameClass, lang, fn) {
			var eleBg = $('<div></div>').css(this.publicStyle.popupBgStyle).addClass('artconfirm_bg artconfirm_close')
			$('body').append(eleBg)
			$('.artconfirm_bg').fadeIn(300)
			var langArr = lang === 'zh_cn' ? ['提示框', '确定', '取消'] : ['Tip frame', 'Sure', 'Cancel']
			var eleFrame = $('<div><h6><i class="icon-info-sign mr10"></i>' 
				+ langArr[0] 
				+ '</h6><p>' 
				+ value 
				+ '</p><div class="frameFooter"><span>' 
				+ langArr[1] 
				+ '</span><span class="artconfirm_close">' 
				+ langArr[2] 
				+ '</span></div></div>').addClass(frameClass)
			$('body').append(eleFrame)
			$('.frameFooter span').click(function(){
				$('.'+frameClass + ', .artconfirm_bg').fadeOut( function(event){
					$(this).remove()
				})
				fn($(this).index())
			})
		},
		artTip: function (value, time) {
			var $body = $('body')
			$body.append('<div class="arttipbg"></div><div class="arttip">'+
				value+'</div>')
			$('.arttipbg').fadeIn('200')
			$('.arttip').animate({'opacity':1,'bottom':'40%'},500)
			if (time) {
				var autoTimeOut = setTimeout(function () {
					$.closeArtTip(null, 10)
				}, time)
			}
		},
		closeArtTip: function (value, closetime) {
			if(value) $('.arttip').html(value)
			var closetime = closetime || 2000
			var timeOut = setTimeout(function(){
				$('.arttipbg').fadeIn('200',function(){
					$(this).remove()
				})
				$('.arttip').animate({'opacity':0,'bottom':'30%'},400,function(){
					$(this).remove()
				})
			}, closetime)
		}
	})
}(jQuery))